package main

import (
	"fmt"
	"math"
)
//定义变量
var  (
	aa = 1
	bb = 2
	cc = 3
	)

func variable(){
	var a int = 1
	var s string = "abc"
	//fmt.Printf("%d %q\n",a,s)
	fmt.Println(a,s)
}

func varicbletype(){
	var a,b,c,d = 1,2,true,"aad"
	fmt.Println(a,b,c,d)
}

func varicbletype2(){
	 a,b,c,d := 1,2,true,"aad"
	fmt.Println(a,b,c,d)
}

//算面积
func mianji(){
	var aaa,bbb int = 3,4
	var ccc int
	ccc = int(math.Sqrt(float64(aaa * aaa + bbb * bbb)))
	fmt.Println(ccc)
}

//定义常量
func consts(){
	const y = "01.txt"
	const p,l = 3,4
	var c int
	c = int(math.Sqrt(p * p + l * l))
	fmt.Println(c,y)
}

//枚举

func meiju(){
	const(
		a = iota
		b
		c
		d
	)

	const(
		sa = 1 << (10 * iota)
		cc
		qq
		dd
	)
	fmt.Println(a,b,c,d)
	fmt.Println(sa,cc,qq,dd)
}

//if




func main(){
	//fmt.Print("Hello Min")
	//variable()
	//varicbletype()
	//varicbletype2()
	//fmt.Println(aa,bb,cc)
	//mianji()
	//consts()
	meiju()
}

